﻿<CascadingValue Value="this" IsFixed>
    @ChildContent
</CascadingValue>

@if ( Title != null )
{
    <Heading Class="b-docs-page-methods-title" Size="HeadingSize.Is4">
        @Title
    </Heading>
}

<Table Class="b-docs-methods" Responsive Margin="Margin.Is4.FromBottom">
    <TableHeader ThemeContrast="@ThemeContrast">
        <TableRow>
            <TableHeaderCell>@Name</TableHeaderCell>
            <TableHeaderCell>Description</TableHeaderCell>
            @if ( ShowReturnType )
            {
                <TableHeaderCell>Return</TableHeaderCell>
            }
            @if ( ShowParameters )
            {
                <TableHeaderCell>Parameters</TableHeaderCell>
            }
        </TableRow>
    </TableHeader>
    <TableBody>
        @foreach ( var docsMethodsItem in DocsMethodsItems )
        {
            <TableRow>
                <TableRowCell>
                    <Code>@docsMethodsItem.Name</Code>
                </TableRowCell>
                <TableRowCell>
                    @docsMethodsItem.ChildContent
                </TableRowCell>
                @if ( ShowReturnType )
                {
                    <TableRowCell>
                        @if ( !string.IsNullOrWhiteSpace( docsMethodsItem.ReturnType ) )
                        {
                            <Code Tag="@docsMethodsItem.ReturnTypeTag">@docsMethodsItem.ReturnType</Code>
                        }
                    </TableRowCell>
                }
                @if ( ShowParameters )
                {
                    <TableRowCell Class="@docsMethodsItem.DefaultClassNames">
                        @if ( !string.IsNullOrWhiteSpace( docsMethodsItem.Parameters ) )
                        {
                            <Code>@docsMethodsItem.Parameters</Code>
                        }
                    </TableRowCell>
                }
            </TableRow>
        }
    </TableBody>
</Table>


